import request from '@/utils/request'


const api_name = `/role`

export default{

    //分页+高级查询
    pageList(query){
        return request({
            url:`${api_name}`,
            method:'post',
            data:query
        })
    },
    //删除角色
    deleteById(id){
        return request({
            url:`${api_name}/${id}`,
            method:'delete'
        })
    },
    //新增或者修改
    saveRole(role){
        return request({
            url:`${api_name}`,
            method:'put',
            data:role
        })
    },
    //批量删除
    batchDelete(ids){
        return request({
            url:`${api_name}/batchDelete`,
            method:'delete',
            data:ids
        })
    }
}